<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>分组结果</title>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
    <h2 class="title">分组结果</h2>
    <div class="container">
        <div class="group-list">
            <c:forEach var="entry" items="${groups}">
                <c:set var="groupNumber" value="${entry.key}" />
                <c:set var="project" value="${projectList[entry.key - 1]}" />
                <div class="group" onclick="window.location.href='DetailServlet?groupNumber=${groupNumber}'">
                    <div class="group-title">${groupNumber}组 - ${project.title}</div>
                    <c:forEach var="student" items="${entry.value}">
                        ${student.name}，${student.studentId}<br>
                    </c:forEach>
                </div>
            </c:forEach>
        </div>
    </div>
</body>
</html>
